export redis_home=/usr/local/redis

usage(){
  echo "  使用方式:redis-client.sh [port]"
  echo "  port: 你要连接的redis-server的端口号"
}

port=$1
doConnect(){
  $redis_home/bin/redis-cli -p $port
}

if [ "$port" == "" ]
then
  usage
  exit 0
fi

doConnect